import { Injectable } from '@nestjs/common';
import { CreateBookDto } from './dto/create-book.input';

@Injectable()
export class BooksService {

  create(createBookInput: CreateBookDto) {
     return {
      id: "1",
      name: "斗破苍穹",
      type: "武侠/玄幻",
      author: {
        id: '1',
        name: '天蚕土豆',
        gender: "1",
        email: "newking@email.com",
      }
     }
  }


  findAll() {
    return [
      {
        exampleField: 1,
      },
      {
        exampleField: 2,
      },
      {
        exampleField: 3,
      }
   ]
  }

  // findOne(id: number) {
  //   return `This action returns a #${id} book`;
  // }

}
